<!-- 健康体检 -->
<template>
	<view class="health-examination-wrapper">
		<uni-section title="套餐推荐" type="line">
			<view class="setmeal-item" v-for="(tj, index) in tijianList" :key="index" @click="toDetail(tj.id)">
				<view class="image-wrapper">
					<image :src="tj.thumb"></image>
				</view>
				<view class="content-wrapper">
					<p>{{tj.title}}</p>
					<p></p>
					<p style="color: #ff9800;">￥{{tj.price}}</p>
				</view>
			</view>
		</uni-section>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				tijianList: []
			}
		},
		onLoad() {
			this.loadTiJianList()
		},
		methods: {
			/**
			 * 加载体检分类
			 */
			loadTiJianList() {
				// this.$app._get('entry/wxapp/tijian.catefenlei', {}, (result)=>{
				// 	console.log(result)
				// })
				this.$app._get('entry/wxapp/tijian.listall', {}, (result) => {
					this.tijianList = result
					console.log(result)
				})
			},
			toDetail(id) {
				console.log(id)
				uni.navigateTo({
					url: '/pages/healthExamination/detail?id=' + id
				})

			}
		}
	}
</script>

<style scoped lang="scss">
	
	.health-examination-wrapper {
		box-sizing: border-box;
		padding: 10px;

		.top-menu {
			display: flex;
			align-items: center;

			.menu-item {
				width: 20%;
				display: flex;
				flex-direction: column;
				align-items: center;
				padding: 10px 0px 20px 0px;

				image {
					width: 30px;
					height: 30px;
					border-radius: 30px;
					padding: 10px;
					
					&.jytc {
						background-color: #FF9E38;
					}
				}
			}
		}

		.setmeal-item {
			display: flex;
			align-items: center;
			padding: 8px;

			.image-wrapper {
				width: 30%;
				height: 100px;
				background-color: #eeeeee;

				image {
					width: 100%;
					height: 100%;
					border-radius: 6px;
					border: 1px solid #eee;
				}
			}

			.content-wrapper {
				display: flex;
				flex-direction: column;
				padding: 0 10px 0 10px;

				p {
					line-height: 25px;
				}
			}
		}
	}
</style>